<template>
  <div class="channel-square-container">
    <h2>频道广场</h2>
    <div class="channels">
      <div v-for="channel in channels" :key="channel.id" class="channel-item">
        <img :src="channel.imgPath" :alt="channel.name">
        <p>{{ channel.name }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ChannelSquareComponent',
  data() {
    return {
      channels: [
        // 根据提供的数据填充频道
        { id: '1', name: '手机好物', imgPath: 'https://placehold.co/600x400' },
        { id: '2', name: '运动季', imgPath: 'https://placehold.co/600x400' },
        // 其他频道...
      ]
    };
  },
};
</script>

<style scoped>
.channel-square-container {
  padding: 20px;
}

.channels {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.channel-item {
  width: 20%;
  margin-bottom: 20px;
  text-align: center;
}
</style>